#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
	int n = 0;
	while (scanf("%d", &n) != EOF)
	{
		int a = 1;
		int i = 0;
		int c = 0;
		for (i = 0; i < n; i++)
		{
			a = a + i;
			int j = 0;
			printf("%d ", a);
			int m = 0;
			c = a;
			for (j = 0; j < n - i - 1; j++)
			{
				c = c + 2 + i + m;
				m = m + 1;
				printf("%d ", c);
			}
			printf("\n");
		}
	}
	return 0;
}